package com.langll.mcp;


import com.langll.mcp.portfolio.mcp.PortfolioProductMCP;
import com.langll.mcp.service.DateService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class AiSpringbootMcpServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(AiSpringbootMcpServerApplication.class, args);
    }

    @Bean
    public ToolCallbackProvider addressDateTools(DateService dateService,
                                                 PortfolioProductMCP portfolioProductMCP) {
        return MethodToolCallbackProvider.builder()
                .toolObjects(portfolioProductMCP)
                .build();
    }

}

